nautil
Class ProcessQuery

public class ProcessQuery

Title: Notarization Authority Utilities

Description:

Copyright: Copyright (c) 2003

Company: UCSC

Version:
1.0
Author:
H.E.M.H.B. Ekanayake
Method Detail

getResults

public ResultSet getResults(String query)
Execute a SQL query and returns the resulting resultset E.g. getResults("SELECT * FROM MailStore")
Parameters:
query - SQL query string
Returns:
resultset or null

justUpdate

public int justUpdate(String query)
Just execute a SQL query E.g. justUpdate("INSERT INTO ...") E.g. justUpdate("UPDATE MailStore SET ...")
Parameters:
query - SQL query string
Returns:
1 is successful; -1 otherwise

isExist

public boolean isExist(String query)
Check whether the SQL query executed correctly. Used to check the existance of a item in a db E.g. isExist("SELECT mailid FROM ... WHERE ...")
Parameters:
query - SQL query string
Returns:
true if exist; false otherwise

getString

public String getString(String query,
                        String field)
Execute a SQL query and returns the string contained in the specified field. E.g. getString("SELECT mailid FROM ...", "mailid")
Parameters:
query - SQL query string
field - field in a database
Returns:
string value or null

getBoolean

public boolean getBoolean(String query,
                          String field)
Execute a SQL query and returns the boolean value contained in the specified field. E.g. getBoolean("SELECT ismale FROM ...", "ismale")
Parameters:
query - SQL query string
field - field in a database
Returns:
true or false depending on the boolean value associated with the field; default is false